package com.example.auth.api.controller;

import com.example.mallcommon.RestResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: yang
 * @Date: 2021/8/22 0022 14:45
 * @Version 0.0.1
 */
@RestController
public class HelloController {

    @GetMapping("/list")
    @PreAuthorize(value = "hasPrivilege('list')")
    //@PreAuthorize("hasAuthority('queryAccount')")
    public RestResult  hello() {
        return RestResult.success("Hello World.");
    }

}